<template>
	<view class="form-container">
		<FormPicker label="患者类型" v-model="form.patientType" :options="patientTypes" placeholder="请选择患者类型"
			:required="true" />
		<div class="bottom-button">
			<button class="button" @click="goIndex">下一步</button>
		</div>
	</view>

</template>

<script>
	import FormPicker from '../../components/FormPicker.vue'
	export default {
		components: {
			FormPicker
		},
		data() {
			return {
				form: {
					patientType: null
				},
				patientTypes: ['泌尿造口患者', '前列腺术后患者']
			}
		},
		methods: {
			goIndex() {
				if (!this.form.patientType) {
					uni.showToast({
						title: "请选择患者类型",
						icon: "none",
					});
				} else {
					if (this.form.patientType === '泌尿造口患者') {
						uni.navigateTo({
							url: "/pages/indexM/indexM"
						})
					} else {
						uni.navigateTo({
							url: "/pages/indexQ/indexQ"
						})
					}

				}
			}
		}
	}
</script>

<style>
	.form-container {
		background-color: #f8f9fa;
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		padding: 20rpx;
	}

	.button {
		border-radius: 8px;
		background-color: #4361ee;
		color: white;
		width: 400rpx;
	}

	.bottom-button {
		margin-top: auto;
		display: flex;
		justify-content: center;
		margin-bottom: 150rpx;
	}
</style>